/*******************************************************************************
 * Copyright (c) 2012 Clever Devices.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the GNU Public License v3.0
 * which accompanies this distribution, and is available at
 * http://www.gnu.org/licenses/gpl.html
 * 
 * Contributors:
 * 	Clever Devices Interns - 
 * 	Alex Frankel, Andria Young, Kevin Thomas, Nicholas Culpepper, Taner Oztimurlenk, Thomas Volberg
 ******************************************************************************/
package com.framework.cleverstop_tentative;

import android.app.DialogFragment;
import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.TextView;

/**
 * Displayed when a bus was selected from the map.
 * Displays bus Id and final destination of the bus
 * 
 * @author AFrankel
 *
 */
public class BusDetailFragment extends DialogFragment implements OnClickListener{
	
	String routeId;
	String dest;
	Button bArrivals;
	TextView tvRouteId, tvDestination;
	
	public BusDetailFragment(String id, String destination){
		routeId = id;
		dest = destination;
	}

	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		
		View view = inflater.inflate(R.layout.bustime_bus_detail, container);
		tvRouteId = (TextView) view.findViewById(R.id.routeID);
		tvDestination = (TextView) view.findViewById(R.id.destinationText);
		bArrivals = (Button) view.findViewById(R.id.bArrivalsGrid);
		
		tvRouteId.setText("Route: " + routeId);
		tvDestination.setText("Destination: " + dest);
		
		
//		mUsername = (EditText) view.findViewById(R.id.btUsername);
//		mPassword = (EditText) view.findViewById(R.id.btPassword);
//		mUsername.requestFocus();
//		getDialog().getWindow().setSoftInputMode(LayoutParams.SOFT_INPUT_STATE_VISIBLE);
//		
//		mOk = (Button) view.findViewById(R.id.bOK);
//		mCancel = (Button) view.findViewById(R.id.bCancel);
//		
//		mOk.setOnClickListener(this);
//		mCancel.setOnClickListener(this);
//		
//		getDialog().setTitle("BusTime | " + taName);
		
		
		return view;
	}




	@Override
	public void onClick(DialogInterface arg0, int arg1) {
		// TODO Auto-generated method stub
		
	}
}
